<template>
  <view scroll-y style="padding: 50upx 30upx" class="news_detail">
    <view class="color-333">{{detail.newsName}}</view>
    <view class="color-666">{{detail.createTime}}</view>
    <u-parse :html="detail.newsContent"></u-parse>
  </view>
</template>

<script>
  import mixins from "./mixins";
  import {request} from "../../util/api";
  export default {
  	mixins: [mixins],
    data() {
    	return {
        current_id: ''
      }
    },

    computed: {
  		detail() {
        let detail = this.news.filter(item => item.id == this.current_id)
        return detail[0]
      }
    },

    onLoad(option) {
      this.current_id = option.id
      // 更新浏览量
      request({
        url: '/system/wx/add/lookNum/' + option.id,
        token: true
      }).then(res => {
        console.log(res)
      })
    }
  }
</script>

<style lang="scss" scoped>
  .news_detail {
    .color-333 {
      font-size: 36upx;
      padding-bottom: 30upx;
    }
    .color-666 {
      font-size: 24upx;
      padding-bottom: 45upx;
    }
  }
</style>
